package com.dospyer.consumer.configuration;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author : peigen
 * Date: 2022/3/4 9:35 AM
 */
@Configuration
public class RestTemplateConfiguration {
    // @LoadBalanced这个注解，spring-cloud-commons 这个项目
    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }

}
